package com.eattravel.controller;

import com.eattravel.cache.RedisUtils;
import com.eattravel.pojo.Commodity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;
import java.util.Set;

@Controller
@RequestMapping("redis")
public class RedisController {

    @Autowired
    RedisUtils redisUtils;

    @ResponseBody
    @RequestMapping("/showclicked")
    public Set<Object> selectAllCommodityCollection() {
        Set<Object> commodityList=redisUtils.sGet("123");
        return commodityList;
    }
}
